%% this script is used to plot the eigenvalues of the graph
clear all;
clear java;

% vec_path = 'E:\data\PNNL\smhagos';
% % vec_path = 'E:\leeten\project\data\FlowEntropy\3D';
% % vec_path = 'E:\data\nek';
% 
%     'source', ...
% 	'sink', ...
% 	'circle', ...
% 	'saddle', ...
% 	'electro', ...
% 	'equation', ...
% 	'tornado_swapped', ...
% 	'wrfout_d01_2007-10-01_18_00_00.t_1.d_1', ...
%     ;
%     'source.block_graph.block_8_8_8.weight_streamline', ...
%     'circle.block_graph.block_8_8_8.weight_streamline', ...
%     'saddle.block_graph.block_8_8_8.weight_streamline', ...
%     'equation.block_graph.block_8_8_8.weight_streamline', ...
%     'tornado_swapped.block_graph.block_8_8_8.weight_streamline', ...
%     'wrfout_d01_2007-10-01_18_00_00.t_1.d_1.block_graph.block_30_30_9.weight_streamline', ...
%     'plume.block_graph.block_32_32_32.weight_streamline', ...
% %     'sink.block_graph.block_8_8_8.weight_streamline', ...
%     ;
% 
% graph_names = {...
%     'wrfout_d01_2007-10-01_18_00_00.t_1.d_1.block_graph.block_90_90_1.weight_streamline', ...
%     };

vec_graphs = ...
{
    {'E:\leeten\project\data\FlowEntropy\3D\isabel', 'isabel.t_20.d_1.skip', 'block_graph.block_20_20_9.weight_streamline'}, ...
};
n_graphs = length(vec_graphs);

% th #eig values per iteration
max_n_eigs = 36; 

%% scan all vector fields
for graphi = 1:n_graphs
    vec_path = vec_graphs{graphi}{1};
    vec_name = vec_graphs{graphi}{2};
    graph_postfix = vec_graphs{graphi}{3};
    
    graph_name = [vec_name '.' graph_postfix];
    
    script_apply_spectral_analysis_to_graph;
end

